<?php
namespace App\Pay\Exceptions;

class Exception extends \Exception
{

    const INVALID_ARGUMENT_ERROR = 400001;

    const GATEWAY_ERROR = 500001;

    public $raw;

    public function __construct($message = "", $raw = [], $code = 0)
    {
        $message = $message ?: '未知错误';
        $this->raw = is_array($raw) ? $raw : [$raw];
        parent::__construct($message, intval($code));
    }
}
